#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;

class Solution
{
public:
    vector<int> twoSum(vector<int> &nums, int target)
    {

        vector<int> result = {0,0};
        auto count = nums.size();
        for (auto i=0;i<count; ++i) {
            auto diff = target - nums[i];
            for (auto j = 0;j<count; ++j) {
                if (nums[j] == diff && i != j) {
                    result[0] = i;
                    result[1] = j;
                    return result;
                }
            }
        }
        return result;
    }
};


int main()
{
    auto s = Solution();
    vector<int> veci = {3,2,4};
    auto target = 6;
    auto result = s.twoSum(veci, target);
    std::cout<<result[0]<<std::endl;
    std::cout<<result[1]<<std::endl;
    return 0;
}

